@import "./_codepoints.scss";

/**
* Add additional platform icons
*/
.ion-star:before,
.ion-star-outline:before,
.ion-star-half:before,
.ion-heart:before,
.ion-heart-outline:before
{
  font-family: 'Ionicons';
}

.ion-star:before { content: $ionicon-var-ios-star; }
.ion-star-outline:before { content: $ionicon-var-ios-star-outline; }
.ion-star-half:before { content: $ionicon-var-ios-star-half; }
.ion-heart:before { content: $ionicon-var-ios-heart; }
.ion-heart-outline:before { content: $ionicon-var-ios-heart-outline; }

$ionic-android-icon-map: (
  'ion-arrow-up-a': $ionicon-var-android-arrow-up,
  'ion-arrow-up-c': $ionicon-var-android-arrow-up,
  'ion-arrow-down-a': $ionicon-var-android-arrow-down,
  'ion-arrow-down-c': $ionicon-var-android-arrow-down,
  'ion-arrow-left-a': $ionicon-var-android-arrow-back,
  'ion-arrow-left-c': $ionicon-var-android-arrow-back,
  'ion-arrow-right-a': $ionicon-var-android-arrow-forward,
  'ion-ion-arrow-right-c': $ionicon-var-android-arrow-forward,
  'ion-close-circled': $ionicon-var-android-cancel,
  'ion-refresh': $ionicon-var-android-refresh,
  'ion-loop': $ionicon-var-android-sync,
  'ion-heart': $ionicon-var-android-favorite,
  'ion-heart-outline': $ionicon-var-android-favorite-outline,
  'ion-clock': $ionicon-var-android-time,
  'ion-pinpoint': $ionicon-var-android-locate,
  'ion-chatboxes': $ionicon-var-android-chat,
  'ion-chatbox-working': $ionicon-var-android-textsms,
  'ion-compass': $ionicon-var-android-compass,
  'ion-person': $ionicon-var-android-person,
  'ion-person-stalker': $ionicon-var-android-people,
  'ion-person-add': $ionicon-var-android-person-add
);

$material-icon-map: (
  'ion-arrow-up-b': $material-arrow-up-b,
  'ion-arrow-down-b': $material-arrow-down-b,
  'ion-arrow-swap': $material-swap-horizontal,
  'ion-chevron-up': $material-chevron-up,
  'ion-chevron-down': $material-chevron-down,
  'ion-chevron-right': $material-chevron-right,
  'ion-chevron-left': $material-chevron-left,
  'ion-navicon': $material-navicon,
  'ion-arrow-shrink': $material-shrink,
  'ion-arrow-expand': $material-expand,
  'ion-arrow-move': $material-arrow-move,
  'ion-checkmark-circled': $material-check-circle,
  'ion-checkmark': $material-checkmark,
  'ion-close': $material-close,
  'ion-plus': $material-plus,
  'ion-plus-circled' : $material-plus-circled,
  'ion-plus-circled-outline': $material-plus-circled,
  'ion-remove': $material-minus,
  'ion-remove-circled': $material-minus-circled,
  'ion-remove-circled-outline': $material-minus-outlined,
  'ion-information': $material-information,
  'ion-information-circled': $material-information,
  'ion-help': $material-help,
  'ion-help-circled': $material-help,
  'ion-help-outline': $material-help-outline,
  'ion-backspace': $material-backspace,
  'ion-alert': $material-alert,
  'ion-alert-circled': $material-alert-circled,
  'ion-alert-circled-outline': $material-alert-circled-outline,
  'ion-shuffle': $material-shuffle,
  'ion-home': $material-home,
  'ion-search': $material-search,
  'ion-flag': $material-flag,
  'ion-star': $material-star,
  'ion-star-outline': $material-star-outline,
  'ion-star-half': $material-star-half,
  'ion-more': $material-more,
  'ion-grid': $material-grid,
  'ion-calendar': $material-calendar,
  'ion-navigate': $material-navigation,
  'ion-location': $material-location,
  'ion-pin': $material-pin-drop,
  'ion-map': $material-map,
  'ion-locked': $material-lock-closed,
  'ion-unlocked': $material-lock-open,
  'ion-chatbubble': $material-chat-bubble,
  'ion-chatbubble-working': $material-chat-working
);

/**
* Override Android icons
*/
.platform-android, .platform-override {
  &.use-material-icons {
    // Override with Ionic Android icons
    @each $class, $code-point in $ionic-android-icon-map {
      @include override-ionic-icon($class, $code-point, false);
    }

    // Override with Material Design icons
    @each $class, $code-point in $material-icon-map {
      @include override-ionic-icon($class, $code-point);
    }
  }
}
